package algorithm;

import java.awt.Color;
import java.awt.image.BufferedImage;
import java.util.ArrayList;

public class Textures {
	private ArrayList<Mask> masks;
	
	public Textures(){
		masks= new ArrayList<Mask>();
	}

	public void addMask(Mask m){
		masks.add(m);
	}
	
	public BufferedImage changeTexture(BufferedImage picture){
		for (int i = 0; i < masks.size(); i++) {
			picture= masks.get(i).changeTexture(picture);
		}
		return picture;
	}
	
	public void setColor(String name, Color c){
		for (int i = 0;  i < masks.size(); i++) {
			Mask m=masks.get(i);
			if(m.getName().equals(name)){
				m.setColor(c);
				break;
			}		
		}
	}
	
}
